package com.design.visitor;

import com.design.util.XMLUtil;

/**
 * @author leali
 * @title: Client
 * @projectName design
 * @description: 主程序
 * @date 2021/12/31 23:48
 */
public class Client {
    public static void main(String[] args) {
        EmployeeList list = new EmployeeList();
        Employee fte1, fte2, fte3, pte1, pte2;

        fte1 = new FulltimeEmployee("张无忌", 3200.00, 45);
        fte2 = new FulltimeEmployee("杨过", 2000.00, 40);
        fte3 = new FulltimeEmployee("段誉", 2400.00, 38);
        pte1 = new ParttimeEmployee("洪七公", 80.00, 20);
        pte2 = new ParttimeEmployee("郭靖", 60.00, 18);

        list.addEmployee(fte1);
        list.addEmployee(fte2);
        list.addEmployee(fte3);
        list.addEmployee(pte1);
        list.addEmployee(pte2);

        Department dep = (Department) XMLUtil.getValueByTagName("visitorName", 0, true);
        System.out.println(dep);
        list.accept(dep);
    }
}
